/**
 * 专门暴露一个 store 对象 , 整个应用只有一个 store 对象 
 */
import { legacy_createStore as createStore,applyMiddleware,combineReducers} from 'redux'

// 引入为Count 服务的reducer
import countReducer from './reducers/count'

// 引入为Person 服务的reducer
import personReducer from './reducers/person'
import {thunk} from 'redux-thunk'
import {composeWithDevTools} from 'redux-devtools-extension'

const  allReducer=combineReducers({
    count:countReducer,
    persons:personReducer
})

//暴露出来store 

export default createStore(allReducer,composeWithDevTools(applyMiddleware(thunk)))
